package com.example.controller;

import com.example.entity.Inline;
import com.example.mapper.InlineMapper;
import org.apache.catalina.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@RestController
@RequestMapping("/user")
public class InlineController {

    @Resource
    private InlineMapper inlineMapper;

    @GetMapping("/page/{page}")
    public List<Inline> listUser(@PathVariable("page")Integer page) {
        return inlineMapper.findUsers(page);
    }

    @GetMapping("/count")
    public int count() {
        return inlineMapper.countUser();
    }


}
